import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {FollowstateModel} from "../../../model/pages/activity/followstate/followstate.model";

/*
  Generated class for the FollowstateProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class FollowstateProvider {

  constructor(public http: HttpClient) {

  }

  // 切换跟进状态
  switchFollowState(followStateModel: FollowstateModel) {

      let params = {"customerId": followStateModel.customerId,
          "name": followStateModel.name,
          "tel": followStateModel.tel,
          "activityId": followStateModel.activityId
      };

      return this.http.post('/followstate/v1/app/update', params, {responseType: 'text'});
  }

}
